package com.newlink.building.secret.mvp.contract

import com.newlink.building.common_base.base.IModel
import com.newlink.building.common_base.base.IPresenter
import com.newlink.building.common_base.base.IView
import com.newlink.building.common_base.model.bean.*
import io.reactivex.Observable

/**
 * Created by xiaodong on 2022/10/2.
 */
interface Module_Secret_SecretKeyListContract {
    interface View : IView {
        fun refreshSecretList(total: Int, data: MutableList<SecretKeyData>)
        fun refreshFailed()
        fun refreshDevices()
    }

    interface Presenter : IPresenter<View> {
        fun getSecretKeyList(
            accessToken: String,
            uId: String,
            requestType: String,
            page: Int,
            limit: Int,
            mac: String
        )

        fun getDeviceList(request: DeviceListRequest)
    }

    interface Model : IModel {
        fun getSecretKeyList(
            accessToken: String,
            page: Int,
            limit: Int
        ): Observable<HttpResult<SecretKeyListData>>

        fun getDeviceList(request: DeviceListRequest): Observable<HttpResult<DeviceListData>>
    }
}